package com.carleasoft.mps.cms.business.article.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.carleasoft.mps.cms.business.article.bean.entity.AuthorityCategoryEntity;
import com.carleasoft.mps.cms.business.article.bean.po.CategoryInsertPo;
import com.carleasoft.mps.cms.business.article.bean.po.CategoryPo;
import com.carleasoft.mps.cms.business.article.bean.vo.CategoryNameTreeVo;

import java.util.List;

public interface CategoryService extends IService<AuthorityCategoryEntity> {

    /**
     *  栏目编辑/停用/删除
     * @param
     * @return
     */
    void updateCategory(CategoryInsertPo categoryInsertPo);


    /**
     * 树接口查询
     * @return
     */
    List<CategoryNameTreeVo> findAllCategoryTree(CategoryPo categoryPo);

    /**
     * 添加栏目
     */
    void insertCategory(CategoryInsertPo categoryInsertPo);

    int updateWeight(AuthorityCategoryEntity authorityCategoryEntity);

    AuthorityCategoryEntity selectByCode(String categoryCode);

    String findByParentCode(String categoryCode);

    List<CategoryNameTreeVo> categoryTree(CategoryPo categoryPo);
}
